package com.example.xd.tuiliu_test.videoplayer.util;

public class TimeUtil {
    public static String MSEL2Hour(long time) {
        int second = (int) (time / 1000);
        String strSecond = second % 60 + "";
        String strMinute = second / 60 % 60 + "";
        String strHour = second / 60 / 60 + "";
        strSecond = strSecond.length() > 1 ? strSecond : "0" + strSecond;
        if (second / 60 == 0) {
            strMinute = "00";
            return strMinute + ":" + strSecond;
        } else if (second / 60 / 60 == 0) {
            strMinute = strMinute.length() > 1 ? strMinute : "0" + strMinute;
            return strMinute + ":" + strSecond;
        } else {
            strMinute = strMinute.length() > 1 ? strMinute : "0" + strMinute;
            return strHour + ":" + strMinute + ":" + strSecond;
        }
    }
}
